package org.mentalsmash.tazio.transparency.clientServerInteraction.client.test;

import org.mentalsmash.tazio.transparency.wrm.ReplicaManager;
import org.mentalsmash.tazio.transparency.wrm.connectionManager.impl.WeakReplicaManagerModule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.inject.Guice;
import com.google.inject.Injector;

public class EchoClient {

	private final static Logger log = LoggerFactory.getLogger(EchoClient.class);
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		Injector injector = Guice.createInjector(new WeakReplicaManagerModule());
		ReplicaManager replicaManager = injector.getInstance(ReplicaManager.class);
		
		replicaManager.connect();
		System.out.print("connessione completata");
		
		/*
		TransactionMessageTemp transactionMessage;
		
		
		for (int i = 0; i < 5; i++) {
			
			log.debug("creating a message");
			transactionMessage = new TransactionMessageTemp("prova "+i,"message number "+i);
			log.debug("message created, sending it");
			
			replicaManager.sendAtLeastOnce(transactionMessage);
			
			log.debug("sent message number "+i);
			
		}
		*/
		
	}

}
